﻿@model Pro260Website.Models.ListingViewModel<Domain.Entity.Game>

@{
    ViewBag.Title = "Admin -- Games";
}
<h1 class="title @Html.GetColor(Request.Cookies["color"])">Games</h1>
<div id="formBackground">
@if (!string.IsNullOrEmpty(ViewBag.Message))
{
    <h1>@ViewBag.Message</h1>
}

@using (Html.BeginForm("Index", "Game", FormMethod.Get))
{
    <input type="text" id="searchFor" name="searchFor" />
    <input type="submit" value="Search" class="actionButtons @Html.GetColor(Request.Cookies["color"])"/>
}

    <div id="titlelessItem">
        <div class="item">
            @Html.ActionLink("Create", "Create")
        </div>
    </div>

    @foreach (var game in Model.Items)
    {
            <div id="titlelessItem">
                <div class="item">
                    @{ Html.RenderPartial("GameSummary", game); } <br/>
                    @Html.ActionLink("Create MetaScore", "CreateMetaScore", new { id = game.Id }, new { @class = "actionButtons " + @Html.GetColor(Request.Cookies["color"]) })
                </div>
                </div>
    }
    

    <div id="pagerForm" class="pager @Html.GetColor(Request.Cookies["color"])" >
        @Html.PageLinks(Model.PagingInfo, i => Url.Action("Index","Game", new { page = i, pageSize = Model.PagingInfo.ItemsPerPage }))
    </div>

    
</div>
